<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    var id = 5;
    switch (id){
        case 1:
            alert("普通会员");
            break;
        case 2:
            alert("黄金会员")
            break;
        case 3:
            alert("管理员")
            break;
        default:
            alert("游客")
    }


</script>

</body>
</html>